<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Psa_Plugin_Router</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/AbstractClass_logo.png"
														alt="Abstract Class"
														title="Abstract Class"
														style="vertical-align: middle"> Psa_Plugin_Router</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstract class for plugins type of <em>Psa_Plugin_Router</em>.</p>
<p class="description"><p>Router plugins is called by <a href="../../psa/_front_controller.php.html">front_controller.php</a> script so it is  firstly called before all other plugins. Router plugin is used to decide which controller to call.  That decision can be made from given URL path if your web server is set to use rewrite rules,  which is common practice, but can also be made from get or post values. It's up to you what you will use.</p><p>If you want to use rewrite rules you must set up your web server for this, with Apache web server  you can do it by enabling <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite</a>  by adding line like this into the configuration file:</p><p><kbd>LoadModule rewrite_module modules/mod_rewrite.so</kbd></p><p>Make sure that you can override (AllowOverride directive) rewrite settings with .htaccess file.  Edit .htaccess file to match your configuration.</p><p>There cannot be more than one Router plugin in your application.</p><p>You can write <em>Psa_Plugin_Router</em> plugins by extending this class. Here is an example:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">Router&nbsp;</span><span class="src-key">extends&nbsp;</span><a href="../../psa/plugins/Psa_Plugin_Router.html">Psa_Plugin_Router</a><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;you&nbsp;have&nbsp;to&nbsp;define&nbsp;psa_main()&nbsp;method&nbsp;in&nbsp;your&nbsp;child&nbsp;class</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><span class="src-id">psa_main</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;global&nbsp;config&nbsp;array&nbsp;from&nbsp;config.php&nbsp;file</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$PSA_CFG</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;remove&nbsp;query&nbsp;string&nbsp;from&nbsp;url</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_uri_arr&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'?'</span><span class="src-sym">,</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">&quot;REQUEST_URI&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;If&nbsp;application&nbsp;root&nbsp;folder&nbsp;is&nbsp;in&nbsp;subfolder&nbsp;from&nbsp;server&nbsp;root&nbsp;like:&nbsp;www.example.com/my/application/</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;remove&nbsp;unnecessary&nbsp;part&nbsp;of&nbsp;path.&nbsp;In&nbsp;case&nbsp;of&nbsp;url&nbsp;above&nbsp;that&nbsp;would&nbsp;be&nbsp;'/my/application'.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;This&nbsp;value&nbsp;should&nbsp;be&nbsp;set&nbsp;in&nbsp;$PSA_CFG['folders']['basedir_web']&nbsp;config&nbsp;variable&nbsp;in&nbsp;psa&nbsp;config.php&nbsp;file</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;or&nbsp;even&nbsp;better&nbsp;in&nbsp;site&nbsp;specific&nbsp;config_override.php&nbsp;file.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$PSA_CFG</span><span class="src-sym">[</span><span class="src-str">'folders'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'basedir_web'</span><span class="src-sym">]</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$PSA_CFG</span><span class="src-sym">[</span><span class="src-str">'folders'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'basedir_web'</span><span class="src-sym">]&nbsp;</span>.&nbsp;<span class="src-str">'/'</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;remove&nbsp;first&nbsp;'/'&nbsp;if&nbsp;application&nbsp;is&nbsp;in&nbsp;the&nbsp;web&nbsp;server&nbsp;root&nbsp;folder</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;explode&nbsp;REQUEST_URI&nbsp;and&nbsp;find&nbsp;controller&nbsp;name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_uri_arr&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'/'</span><span class="src-sym">,</span><span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;This&nbsp;router&nbsp;is&nbsp;written&nbsp;to&nbsp;find&nbsp;controller&nbsp;name&nbsp;from&nbsp;url&nbsp;path&nbsp;and&nbsp;that&nbsp;name&nbsp;should&nbsp;be</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;the&nbsp;first&nbsp;element&nbsp;of&nbsp;$request_uri_arr&nbsp;array.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;For&nbsp;simple&nbsp;applications&nbsp;you&nbsp;will&nbsp;know&nbsp;the&nbsp;name&nbsp;of&nbsp;your&nbsp;controller&nbsp;class&nbsp;so&nbsp;you&nbsp;don't</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;need&nbsp;to&nbsp;do&nbsp;this.</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;controller&nbsp;name&nbsp;should&nbsp;be&nbsp;the&nbsp;first&nbsp;element&nbsp;of&nbsp;the&nbsp;array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$controller_alias&nbsp;</span>=&nbsp;<span class="src-var">$request_uri_arr</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;You&nbsp;can&nbsp;check&nbsp;here&nbsp;if&nbsp;controller&nbsp;with&nbsp;this&nbsp;name&nbsp;is&nbsp;registered&nbsp;and&nbsp;if&nbsp;not&nbsp;call&nbsp;default&nbsp;Web_Controller.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;But&nbsp;in&nbsp;this&nbsp;example&nbsp;I&nbsp;know&nbsp;that&nbsp;may&nbsp;application&nbsp;has&nbsp;only&nbsp;two&nbsp;controllers:&nbsp;Web_Controller&nbsp;and</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Soap_Controller.&nbsp;If&nbsp;url&nbsp;starts&nbsp;with&nbsp;webservice/&nbsp;Soap_Controller&nbsp;should&nbsp;be&nbsp;called,&nbsp;otherwise</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;call&nbsp;Web_Controller.</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;if&nbsp;Soap_Controller&nbsp;should&nbsp;be&nbsp;called</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$controller_alias&nbsp;</span>==&nbsp;<span class="src-str">'webservice'</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;load&nbsp;data&nbsp;about&nbsp;plugins</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../../psa/Psa_Plugin.html">Psa_Plugin</a></span><span class="src-sym">::</span><a href="../../psa/Psa_Plugin.html#methodget_instance">get_instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">set_data</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;set&nbsp;controller&nbsp;name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$controller_name&nbsp;</span>=&nbsp;<span class="src-str">'Soap_Controller'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;In&nbsp;this&nbsp;case&nbsp;the&nbsp;action&nbsp;name&nbsp;is&nbsp;second&nbsp;element&nbsp;of&nbsp;$request_uri_arr&nbsp;array&nbsp;so&nbsp;we&nbsp;want&nbsp;to&nbsp;strip</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;first&nbsp;element&nbsp;(controller&nbsp;name/alias)&nbsp;from&nbsp;array&nbsp;because&nbsp;this&nbsp;array&nbsp;will&nbsp;be&nbsp;passed&nbsp;to</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;controller's&nbsp;psa_main()&nbsp;method.&nbsp;That&nbsp;way&nbsp;you&nbsp;know&nbsp;that&nbsp;the&nbsp;first&nbsp;element&nbsp;is&nbsp;always&nbsp;action&nbsp;name.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_uri_arr&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_slice">array_slice</a><span class="src-sym">(</span><span class="src-var">$request_uri_arr</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;default&nbsp;controller&nbsp;is&nbsp;Web_Controller</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$controller_name&nbsp;</span>=&nbsp;<span class="src-str">'Web_Controller'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;start&nbsp;session</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/session_start">session_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;restore&nbsp;plugin&nbsp;object&nbsp;from&nbsp;session</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../../psa/Psa_Plugin.html">Psa_Plugin</a></span><span class="src-sym">::</span><a href="../../psa/Psa_Plugin.html#methodget_instance">get_instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">session_restore</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;want&nbsp;to&nbsp;call&nbsp;psa_main()&nbsp;method&nbsp;of&nbsp;the&nbsp;controller&nbsp;and&nbsp;pass&nbsp;$request_uri_arr&nbsp;to&nbsp;the&nbsp;controller</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;cause&nbsp;the&nbsp;same&nbsp;array&nbsp;will&nbsp;be&nbsp;needed&nbsp;there&nbsp;to&nbsp;decide&nbsp;which&nbsp;actions&nbsp;(models&nbsp;and&nbsp;views)&nbsp;to&nbsp;call.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$run_plugins</span><span class="src-sym">[</span><span class="src-var">$controller_name</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'psa_main'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$request_uri_arr</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;call&nbsp;controller</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../psa/_scripts---functions.php.html#functionpsa_run_plugins">psa_run_plugins</a><span class="src-sym">(</span><span class="src-var">$run_plugins</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p><p><strong>Note:</strong> Router plugin class has to be named Router and file has to be named Router.php and placed  in first directory with plugins (by settings in <a href="../../psa/_config.php.html">config.php</a>). That limitation exists only for router plugin.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../psa/plugins/Psa_Plugin_Controller.html">Psa_Plugin_Controller</a></li>
				<li><span class="field">abstract:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_plugin_classes---Psa_Plugin_Router.class.php.html">/plugin_classes/Psa_Plugin_Router.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Router.class.php.html#a130">130</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																								<div class="method-definition">
					<img src="../../media/images/AbstractMethod.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#psa_main" title="details" class="method-name">psa_main</a>
										()
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodpsa_main" id="psa_main"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/AbstractMethod.png" />
		<span class="method-title">psa_main</span> (line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Router.class.php.html#a137">137</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that must be defined by the child class.</p>
<p class="description"><p>It is supposed to add main functionality of the router plugin into this method.</p></p>
	<ul class="tags">
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			psa_main
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Thu, 21 Oct 2010 01:40:54 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>